<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BabyOS: b_log.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="2.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BabyOS
   &#160;<span id="projectnumber">V2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b9223522bb56aee4ab59f7ba381d2163.html">bos</a></li><li class="navelem"><a class="el" href="dir_f2a2cc749b6bfcea90db6730434b0bd6.html">core</a></li><li class="navelem"><a class="el" href="dir_37b66dfbfdffce01c33ebea49c49c2c3.html">inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">b_log.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="b__log_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#ifndef __B_LOG_H__</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#define __B_LOG_H__</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; <span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">/*Includes ----------------------------------------------*/</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="b__config_8h.html">b_config.h</a>&quot;</span>  </div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#if _DEBUG_ENABLE</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#ga0ef31788537057556fdf75e9aab6f6b7">   65</a></span>&#160;<span class="preprocessor">#define B_LOG_PARAM_NULL        0X0</span></div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#ga32e04a972f530dff233f1832bd13ed01">   66</a></span>&#160;<span class="preprocessor">#define B_LOG_PARAM_LINE        0X1</span></div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#gae038e5487fe13314d11b3b875222b4ba">   67</a></span>&#160;<span class="preprocessor">#define B_LOG_PARAM_FUNC        0X2</span></div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#ga9959c133f3497f8c892f55d0504d0441">   68</a></span>&#160;<span class="preprocessor">#define B_LOG_PARAM_FILE        0X4 </span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160; </div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160; </div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#ga90bdbfc25d68af92b48642a738acdb53">   73</a></span>&#160;<span class="preprocessor">#define B_LOG_BUF_SIZE          256 </span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#ga405ca844a016da7f0bec72c8fcf47530">   75</a></span>&#160;<span class="preprocessor">#define B_LOG_I_PARAM           (B_LOG_PARAM_NULL)  </span></div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#ga3e9f63d6f63f8990b7f89ae59e383881">   76</a></span>&#160;<span class="preprocessor">#define B_LOG_W_PARAM           (B_LOG_PARAM_FUNC | B_LOG_PARAM_LINE) </span></div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#gac3b3e1f63d3d93ff2f03e395e7e30360">   77</a></span>&#160;<span class="preprocessor">#define B_LOG_E_PARAM           (B_LOG_PARAM_FILE | B_LOG_PARAM_FUNC | B_LOG_PARAM_LINE) </span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#gaede57ff0fff8fb51e8d21968436e910e">   79</a></span>&#160;<span class="preprocessor">#define B_LOG_PARAM_DEFAULT     __FILE__,__func__,__LINE__</span></div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">#ifdef _DEBUG_ENABLE</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="preprocessor">    #if (_DEBUG_ENABLE &lt;= 1)</span></div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#gab4b436fe7cd775a38e20f7b9605b804d">   85</a></span>&#160;<span class="preprocessor">        #define b_log_i(...)    bLogOut(0, B_LOG_PARAM_DEFAULT, __VA_ARGS__)</span></div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#gafc78b16ad8aebf30b9cabfc278cfb32a">   86</a></span>&#160;<span class="preprocessor">        #define b_log(...)      bLogOut(3, B_LOG_PARAM_DEFAULT, __VA_ARGS__)</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="preprocessor">    #else</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="preprocessor">        #define b_log_i(...)</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="preprocessor">        #define b_log(...)</span></div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="preprocessor">    #endif</span></div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    </div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="preprocessor">    #if (_DEBUG_ENABLE &lt;= 2)</span></div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#ga4970d2681a982dde9c6a76bbe1ed9c50">   93</a></span>&#160;<span class="preprocessor">        #define b_log_w(...)    bLogOut(1, B_LOG_PARAM_DEFAULT, __VA_ARGS__)</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="preprocessor">    #else</span></div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="preprocessor">        #define b_log_w(...)</span></div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="preprocessor">    #endif</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    </div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="preprocessor">    #if (_DEBUG_ENABLE &lt;= 3)</span></div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="group___l_o_g___exported___defines.html#ga11ccc82208948d13975dfefbb6c8b363">   99</a></span>&#160;<span class="preprocessor">        #define b_log_e(...)    bLogOut(2, B_LOG_PARAM_DEFAULT, __VA_ARGS__)</span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="preprocessor">    #else</span></div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="preprocessor">        #define b_log_e(...)</span></div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="preprocessor">    #endif</span></div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="preprocessor">    #define b_log_i(...) </span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="preprocessor">    #define b_log_w(...) </span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="preprocessor">    #define b_log_e(...) </span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="preprocessor">    #define b_log(...)</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___l_o_g___exported___functions.html#ga94ee46fccd9202efd85188234705e082">bLogOut</a>(uint8_t type, <span class="keyword">const</span> <span class="keywordtype">char</span> *ptr_file, <span class="keyword">const</span> <span class="keywordtype">char</span> *ptr_func, uint32_t line, <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___l_o_g___exported___functions.html#gaac016f215b4e79799b0e083c4d6813dd">bLogOutput</a>(<span class="keywordtype">void</span> *p);</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    }</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="comment">/************************ Copyright (c) 2019 Bean *****END OF FILE****/</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="ttc" id="group___l_o_g___exported___functions_html_gaac016f215b4e79799b0e083c4d6813dd"><div class="ttname"><a href="group___l_o_g___exported___functions.html#gaac016f215b4e79799b0e083c4d6813dd">bLogOutput</a></div><div class="ttdeci">void bLogOutput(void *p)</div><div class="ttdef"><b>Definition:</b> <a href="b__hal_8c_source.html#l00199">b_hal.c:199</a></div></div>
<div class="ttc" id="group___l_o_g___exported___functions_html_ga94ee46fccd9202efd85188234705e082"><div class="ttname"><a href="group___l_o_g___exported___functions.html#ga94ee46fccd9202efd85188234705e082">bLogOut</a></div><div class="ttdeci">void bLogOut(uint8_t type, const char *ptr_file, const char *ptr_func, uint32_t line, const char *fmt,...)</div></div>
<div class="ttc" id="b__config_8h_html"><div class="ttname"><a href="b__config_8h.html">b_config.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
